package com.linkhub.oms.dao.mpservice;

import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.baomidou.mybatisplus.extension.service.IService;
import com.linkhub.oms.common.enums.mp.LocalProductTypeEnum;
import com.linkhub.oms.entity.LocalProductEntity;

import java.util.Collection;
import java.util.List;

/**
 * <p>
 * 本地商品表 服务类
 * </p>
 *
 * @author echo
 * @since 2024-03-28
 */
public interface ILocalProductService extends IService<LocalProductEntity> {

    LocalProductEntity getBySkuId( String skuId );

    void updateBySkuId( LocalProductEntity localProductEntity );

    LocalProductEntity getLocalProductBySku( String skuId, String userId, String sku );

    LocalProductEntity getLocalProductByUpc( String skuId, String userId, String upc );

    LocalProductEntity getLocalProductByFnsku( String skuId, String userId, String fnsku );

    LocalProductEntity getLocalProductByOtherCode( String skuId, String userId, String otherCode );

    List<String> listLocalProductCodes( String userId,
                                        Collection<String> codes,
                                        SFunction<LocalProductEntity, String> column );

    List<LocalProductEntity> listBySkuIds(Collection<String> skuIds);

    void updateLocalProductBySkuId(LocalProductEntity localProductEntity);

    LocalProductEntity deepMappingLocalProduct( LocalProductEntity localProductEntity );

    List<LocalProductEntity> getLocalProductByType( LocalProductTypeEnum localProductTypeEnum );
}
